/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package example.hello;

import java.rmi.Naming;
import java.rmi.RemoteException;

/**
 *
 * @author jfdenise
 */
public class Client {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
//            Hello obj = (Hello) Naming.lookup("//localhost/Monitoring");
//            String message = obj.sayHello();
            Monitoring m = (Monitoring) Naming.lookup("//localhost/Monitoring");
            SystemInfo display=m.quid();
            System.out.println("Valeurs affichées pour 5, 10 et 15 minutes" + display.getCpu().getCpu());
            System.out.println("RAM Libre " + display.getRam().getRam());
            System.out.println("Liste des processus courants : ");
            for (String s: display.getProg().getProg()) {
            System.out.println(s);
            }
        } catch (Exception e) {
            System.out.println("Client exception: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
